package ru.compscicenter.uno;

import ru.compscicenter.uno.controller.ClientController;
import ru.compscicenter.uno.controller.ServerController;
import ru.compscicenter.uno.view.SwingViewer;
import ru.compscicenter.uno.view.View;

/**
 * User: SLeeP
 * Date: 10.12.11
 * Time: 4:53
 */
public class GUIClient {
    public static void main(String[] args){
        View viewer = null;
        if (args[0].equals("0")) {
            ClientController controller = new ClientController(false, false);
            controller.setDaemon(true);
            controller.start();
            viewer = new SwingViewer(controller);
        } else if (args[0].equals("1")) {
            ServerController controller = new ServerController(false, "Server");
            controller.setDaemon(true);
            controller.start();
            viewer = new SwingViewer(controller);
        }
        viewer.run();
    }
}
